//
//  TrackRecordTableViewCell.m
//  PlayerWorld
//
//  Created by 1 on 16/5/13.
//  Copyright © 2016年 刘成. All rights reserved.
//
#define UISCREEN_WIDTH  [UIScreen mainScreen].bounds.size.width
#define UISCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

#import "TrackRecordTableViewCell.h"

@implementation TrackRecordTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        // 投注图片
        UIImageView *bettingRecordImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 10, 50, 50)];
        [bettingRecordImageView setImage:[UIImage imageNamed:@"logo_qtc_2_lg"]];
        [self.contentView addSubview:bettingRecordImageView];
        
        // 投注标题
        UILabel *bettingRecordLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(bettingRecordImageView.frame)+10, 10, UISCREEN_WIDTH-120, 20)];
        bettingRecordLabel.font = [UIFont systemFontOfSize:16];
        bettingRecordLabel.text = @"重庆时时彩-多星-五星复式";
        [self.contentView addSubview:bettingRecordLabel];
        
        // 投注时间
        UILabel *BettingtimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(bettingRecordImageView.frame)+10, 30, UISCREEN_WIDTH-120, 40)];
        BettingtimeLabel.font = [UIFont systemFontOfSize:12];
        BettingtimeLabel.textColor = [UIColor lightGrayColor];
        BettingtimeLabel.text = @"第 20150225-059期\n02-25 12:00:25";
//        BettingtimeLabel.lineBreakMode = UILineBreakModeWordWrap;
        BettingtimeLabel.numberOfLines = 0;
        [self.contentView addSubview:BettingtimeLabel];
        
        // 投注钱数
        UILabel *betMoneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(bettingRecordImageView.frame)+10, CGRectGetMaxY(BettingtimeLabel.frame), UISCREEN_WIDTH-120, 20)];
        betMoneyLabel.font = [UIFont systemFontOfSize:12];
        betMoneyLabel.textColor = [UIColor lightGrayColor];
        betMoneyLabel.text = @"6.00元";
        [self.contentView addSubview:betMoneyLabel];
        
        // 彩种结果
        UILabel *bettingResultsLabel = [[UILabel alloc] initWithFrame:CGRectMake(UISCREEN_WIDTH-50-10, CGRectGetMinY(betMoneyLabel.frame), 50, 20)];
        bettingResultsLabel.font = [UIFont systemFontOfSize:14];
        bettingResultsLabel.textColor = [UIColor lightGrayColor];
        bettingResultsLabel.text = @"未中奖";
        [self.contentView addSubview:bettingResultsLabel];
        
        
    }
    return self;
}

@end
